package com.outsourcingmanagesystem.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.scheduling.config.Task;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("projects")
public class Project {
    @TableId
    private Long projectId;
    
    @TableField("project_name")
    private String projectName;
    
    private String description;
    
    @TableField("start_date")
    private LocalDate startDate;
    
    @TableField("end_date")
    private LocalDate endDate;
    
    @TableField("manager_id")
    private Long managerId;
    
    private String status;
    
    @TableField("created_at")
    private LocalDateTime createdAt;
    
    // 非数据库字段
    @TableField(exist = false)
    private User manager;
    
    @TableField(exist = false)
    private List<Task> tasks;
}